package yi;

import java.io.File;
import java.util.Arrays;
import java.util.stream.Stream;

public class NumberTwo {
    public static void main(String[] args) {
        File file=new File("G:/Java_Code/javase_project/heima_rentcar_system/src");
        String[] list = file.list();
        Object[] objects = Stream.of(list)
                .filter(s -> {
                    String[] split = s.split("\\.");
                    if ("java".equals(split[1])){
                        return true;
                    }else {
                        return false;
                    }
                })
                .toArray();
        for (Object object : objects) {
            System.out.println(object);
        }
    }
}
